#include <stdio.h>
int main()
{  	 	     	 
    int n, count;
    float path, height;
    do
    {  	 	     	 
        scanf("%d", &n);        //1
    }
    while (n > 100 || n < 1);   //1

    height = n / 3.0;           //1
    path = n;                   //1
    count = 1;
    while (height >= 0.1)        //1
    {  	 	     	 
        count++;                 //1
        path += height * 2;      //1
        height /= 3;             //1            
    }

    printf("%d,%.3f", count, path); //1
    return 0;                   //1


}  	 